package hr.ctg.domain.action;

import hr.ctg.domain.model.Objekt;

import javax.persistence.EntityManager;

import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;

@Name("testAction")
public class TestAction {
	@In
	EntityManager entityManager;

	public void test1() {
		entityManager.find(Objekt.class, 1);
		entityManager
				.createQuery(
						"select m from Mjesto m join fetch m.opisMjestas o where m.idMjesta=6671 and o.jezik.oznaka='en'")
				.getResultList();
		entityManager.createQuery("select o from Objekt o where o.idObjekta=1")
				.getResultList();
		entityManager.createQuery("select o from Objekt o where o.idObjekta=1")
				.getResultList();
	}
}
